<script type="text/javascript">
	com.em.Role.prototype.dialogButtons = {
			'<?php echo $this->translate('Create'); ?>': function() {
			$.ajax({
				url: '<?php echo $this->url(array('action'=>'create-save')); ?>',
				type: "POST",
				dataType : 'json',
				data : $('#form-role').serialize(),
				beforeSend : function(XMLHttpRequest){
					validator.form();
					if ( !validator.valid() ) {
						return false;
					}
					dialogFormRole.dialog('close');
					com.em.Role.prototype.processingDisplay(true);
					return true;
				},
				success : function(data, textStatus, XMLHttpRequest) {
					if (textStatus == 'success') {
						if ( data.success ) {
							table.fnDraw();
							alert.show(data.message);
						} else {
							alert.show(data.message, {header : com.em.Alert.FAILURE});
						}
					}
				},
				complete : function(jqXHR, textStatus) {
					com.em.Role.prototype.processingDisplay(false);
				},
				error : function(jqXHR, textStatus, errorThrown) {
					dialogFormRole.dialog('close');
					alert.show(errorThrown,{header : com.em.Alert.ERROR});
				}
			});
		},
		'<?php echo $this->translate('Cancel'); ?>': function() {
			$(this).dialog("close");
		}
	};
</script>
									<div id="dialog-form-role" class="no-padding" title="<?php echo $this->translate('Create Role'); ?>">
                                        <form id="form-role" method="post" class="da-form" action="<?php echo $this->url(array('action'=>'create-save')); ?>">
                                            <div id="da-validate-error" class="da-message error" style="display:none;"></div>
                                            <div class="da-form-inline">
                                                <div class="da-form-row">
                                                    <label><?php echo $this->translate('Name'); ?></label>
                                                    <div class="da-form-item large">
                                                        <input type="text" name="name" id="name"/>
                                                    </div>
                                                </div>
                                                <div class="da-form-row">
                                                    <label><?php echo $this->translate('Description'); ?></label>
                                                    <div class="da-form-item large">
                                                        <textarea id="description" name="description"></textarea>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
